﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class DieArea : MonoBehaviour
{

    void Start()
    {

    }

    void Update()
    {

    }
    void OnTriggerEnter2D(Collider2D other)
    {
        Debug.Log("sth enter");
        if (other.gameObject.tag == "Hero")
        {
            //主角进入死亡区域的触发事件
            SceneManager.LoadScene("menu");
        }
    }
}